From 4edb2b15863dbc086e10f261fc9c8012cedfdea8 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 10 Jan 2009 10:42:08 +0000 Subject: [PATCH] Fix Bug #876: (info-insert-file-contents, Info-insert-dir): Bind inhibit-null-byte-detection to non-nil. --- lisp/info.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index 96c7b9d972f..9ee468f311d 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -461,13 +461,15 @@ Do the right thing if the file has been compressed or zipped." (insert-file-contents-literally fullname visit) (let ((inhibit-read-only t) (coding-system-for-write 'no-conversion) + (inhibit-null-byte-detection t) ; Index nodes include null bytes (default-directory (or (file-name-directory fullname) default-directory))) (or (consp decoder) (setq decoder (list decoder))) (apply 'call-process-region (point-min) (point-max) (car decoder) t t nil (cdr decoder)))) - (insert-file-contents fullname visit)))) + (let ((inhibit-null-byte-detection t)) ; Index nodes include null bytes + (insert-file-contents fullname visit))))) (defun Info-file-supports-index-cookies (&optional file) "Return non-nil value if FILE supports Info index cookies. @@ -1094,7 +1096,10 @@ a case-insensitive match is tried." (or buffers (message "Composing main Info directory...")) (condition-case nil - (progn + ;; Index nodes include null bytes. DIR + ;; files should not have indices, but who + ;; knows... + (let ((inhibit-null-byte-detection t)) (insert-file-contents file) (set (make-local-variable 'Info-dir-file-name) file) -- 2.30.2